//
//  ProductDetailTableViewCell.m
//  UEAssistant
//
//  Created by haoxiang on 17/2/12.
//  Copyright © 2017年 youyixinxi. All rights reserved.
//

#import "ProductDetailTableViewCell.h"
#import "RCProgressView.h"

NSString         *productDerailCell = @"sadasdsadsadsadsad";

@implementation ProductDetailTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

- (void)addCustomProgressViewWithProgress:(CGFloat)progress prgressMid:(CGFloat)progressMid progressFoot:(CGFloat)progressFoot Y:(CGFloat)y midY:(CGFloat)midY footY:(CGFloat)footY{
    
    RCProgressView *progressView = [[RCProgressView alloc] initWithFrame:CGRectMake(self.time.frame.origin.x,
                                                                                    y,
                                                                                    Screen_Width - self.time.frame.origin.x-15-50,
                                                                                    8)];
    
    RCProgressView *progressViewMid = [[RCProgressView alloc] initWithFrame:CGRectMake(self.timeMId.frame.origin.x,
                                                                                    midY,
                                                                                    Screen_Width - self.timeMId.frame.origin.x-15-50,
                                                                                    8)];
    
    RCProgressView *progressViewFoot = [[RCProgressView alloc] initWithFrame:CGRectMake(self.timeFoot.frame.origin.x,
                                                                                    footY,
                                                                                    Screen_Width - self.timeFoot.frame.origin.x-15-50,
                                                                                    8)];
    [progressView       setProgress:progress];
    [progressViewMid    setProgress:progressMid];
    [progressViewFoot   setProgress:progressFoot];
    
    [self.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
       
        if ([obj isKindOfClass:[RCProgressView class]]) {
            [obj removeFromSuperview];
        }
    }];

    [self addSubview:progressView];
    [self addSubview:progressViewMid];
    [self addSubview:progressViewFoot];
    
}

@end
